<?php
include_once 'PhpExt/Form/TriggerField.php';
class PhpExt_Form_Multiselect extends PhpExt_Form_TriggerField {
	
	function __construct() {
		parent::__construct();
		$this->setExtClassInfo("Ext.ux.Multiselect", "itemselector","");
		$validProps = array(
		    "width",
		    "height",
		    "displayField",
		    "valueField",
			"fieldLabel",
			"name",
			"multiselects"	    
		);
		$this->addValidConfigProperties($validProps);
	}
	
	public static function createMultiselect($name, $label = null, $id = null) {
	    $c = new PhpExt_Form_Multiselect();
	    $c->setName($name);
	    if ($label !== null)
	      $c->setFieldLabel($label);
	    if ($id !== null)
	      $c->setId($id);	    
	    return $c;
	}
	
	
public function setFieldLabel($value) {
		$this->setExtConfigProperty("fieldLabel", $value);
		return $this;
	}
	
public function setMultiselects($value) {
		$this->setExtConfigProperty("fieldLabel", $value);
		return $this;
	}

public function setId($value) {
		$this->setExtConfigProperty("id", $value);
		return $this;
	}
	public function setValueField($value) {
		$this->setExtConfigProperty("valueField", $value);
		return $this;
	}
	
	public function setWidth($value) {
		$this->setExtConfigProperty("width", $value);
		return $this;
	}
	
	public function setHeight($value) {
		$this->setExtConfigProperty("height", $value);
		return $this;
	}
	
	public function setName($value) {
		$this->setExtConfigProperty("name", $value);
		return $this;
	}
}

?>